import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';

const double ITEM_WIDTH = 25;
const double ITEM_HEIGHT = 25;

class LottieTabbarItemNormal extends StatelessWidget {
  LottieTabbarItemNormal(@required this.name);
  final String name;
  @override
  Widget build(BuildContext context) {
    return Lottie.asset(
      "resource/json/" + name + ".json",
      repeat: false,
      // fit: BoxFit.scaleDown,
      width: ITEM_WIDTH,
      height: ITEM_HEIGHT,
      animate: false,
    );
  }

}

class LottieTabbarItemSelected extends StatelessWidget {
  LottieTabbarItemSelected(@required this.name);
  final String name;
  @override
  Widget build(BuildContext context) {
    return Lottie.asset(
      "resource/json/" + name + ".json",
      repeat: false,
      // fit: BoxFit.scaleDown,
      width: ITEM_WIDTH,
      height: ITEM_HEIGHT,
    );
  }

}
